<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta name="viewport"
        content="initial-scale=1, width=device-width, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <title>行业活动</title>
    <link href="https://cdn.bootcss.com/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://at.alicdn.com/t/font_1440001_47llmi4hsil.css" rel="stylesheet">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/media.css">
</head>

<body>
    <div id="header"></div>

    <!-- 主体 -->
    <section class="activity">
        <div class="container">
            <nav class="navbar navbar-default">
                <ul class="nav" id="industry-nav">
                    <li class="active"><a href="#">活动信息</a></li>
                </ul>
            </nav>
            <div class="row">
                <div class="col-md-8 col-sm-12 col-xs-12">
                    <div class="activity-content" id="activity-list">
                        
                    </div>
                    <a href="javaScript:;" id="more" class="btn btn-primary">查看更多</a>
                </div>
                <div class="col-md-4 col-sm-12 col-xs-12">
                    <div class="side">
                        <a href="javaScript:;" id="pushBtn" class="center-block btn btn-primary"><i
                                class="iconfont icon-dd"></i>我要发布</a>
                        <div class="box">
                            <p class="tit"><a href="javaScript:;">推荐</a></p>
                            <ul>
                                <li class="item-side clearfix">
                                    <div class="item-left">
                                        <a href="#">
                                            <span class="star">资讯</span><span class="txt">font-family 属性应该使用若干种字</span>
                                            <div class="bottom"><span class="fl">资讯平台</span><span class="fr">一周前</span>
                                            </div>
                                        </a>
                                    </div>
                                    <div class="item-right"><a href="#"><img class="img-responsive" src="img/srimg.png"
                                                alt=""></a> </div>
                                </li>
                                <li class="item-side clearfix">
                                    <div class="item-left">
                                        <a href="#">
                                            <span class="star">资讯</span><span class="txt">font-family 属性应该使用若干种字</span>
                                            <div class="bottom"><span class="fl">资讯平台</span><span class="fr">一周前</span>
                                            </div>
                                        </a>
                                    </div>
                                    <div class="item-right"><a href="#"><img class="img-responsive" src="img/srimg.png"
                                                alt=""></a> </div>
                                </li>
                                <li class="item-side clearfix">
                                    <div class="item-left">
                                        <a href="#">
                                            <span class="star">资讯</span><span class="txt">font-family 属性应该使用若干种字</span>
                                            <div class="bottom"><span class="fl">资讯平台</span><span class="fr">一周前</span>
                                            </div>
                                        </a>
                                    </div>
                                    <div class="item-right"><a href="#"><img class="img-responsive" src="img/srimg.png"
                                                alt=""></a> </div>
                                </li>
                                <li class="item-side clearfix">
                                    <div class="item-left">
                                        <a href="#">
                                            <span class="star">资讯</span><span class="txt">font-family 属性应该使用若干种字</span>
                                            <div class="bottom"><span class="fl">资讯平台</span><span class="fr">一周前</span>
                                            </div>
                                        </a>
                                    </div>
                                    <div class="item-right"><a href="#"><img class="img-responsive" src="img/srimg.png"
                                                alt=""></a> </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
   <div id="footer"></div>
</body>
<script src="https://cdn.bootcss.com/jquery/3.1.1/jquery.min.js"> </script>
<script src="https://cdn.bootcss.com/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="js/core.js"></script>
<script src="js/mine.js"></script>
<script>
    $(function () {
        $("#header").load("./header.html")
        $("#footer").load("./footer.html")
        // 行业活动
        Getdata(activity)
            .then(res => {
                var li = "";
                console.log(res)
                $.each(res.data, function (index, val) {
                    li += `<li role="presentation"><a href="#home" aria-controls="home" role="tab" data-id="${val.id}" data-toggle="tab">${val.name}</a></li>`;
                });
                $("#industry-nav").html(li);
                //第一个li添加选中样式 
                $("#industry-nav li").first().addClass("active");
            })

        //活动全部列表
        let size = 10;
        
        Getdata(columnList, { size, current: 1, categoryId: 3, level: 1 })
            .then(res => {
                // console.log(res)
                let itemList = "";
                $.each(res.data.records, function (index, val) {
                    itemList += `<div class="item-main clearfix">
                            <div class="img"><img src="${val.newsPath}" alt=""></div>
                            <div class="des">
                                <a href="detail.html?id=${val.id}">
                                    <p class="tit"><label class="lab">欺诈</label>${val.title}</p>
                                </a>
                                <p class="tit-des">${val.summary}</p>
                                <div class="btn-group">
                                </div>
                                <div class="date"><i class="glyphicon glyphicon-time"></i><span
                                        class="year">${val.gmtDatetime}</span></div>
                            </div>
                        </div>`;
                })
                $("#activity-list").html(itemList);
            })
        // 加载更多
        $("#more").click(function(){
            size += 10;
            let itemList = "";
            Getdata(columnList, { size, current: 1, categoryId: 3, level: 1 })
            .then(res => {
                $.each(res.data.records, function (index, val) {
                    itemList += `<div class="item-main clearfix">
                            <div class="img"><img src="${val.newsPath}" alt=""></div>
                            <div class="des">
                                <a href="detail.html?id=${val.id}">
                                    <p class="tit"><label class="lab">欺诈</label>${val.title}</p>
                                </a>
                                <p class="tit-des">${val.summary}</p>
                                <div class="btn-group">
                                </div>
                                <div class="date"><i class="glyphicon glyphicon-time"></i><span
                                        class="year">${val.gmtDatetime}</span></div>
                            </div>
                        </div>`;
                })
                $("#activity-list").html(itemList);
            })
        })






    })
</script>

</html>